package com.heima.user.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dto.LoginDTO;
import com.heima.model.user.vo.ApLoginVO;
import com.heima.user.service.ApUserService;
import com.heima.user.service.impl.ApUserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zhk
 * @since: 2025/6/12
 */
@RestController
@RequestMapping("/api/v1/login")
public class ApUserLoginController {
    @Autowired
    private ApUserService apUserService;
    @PostMapping("/login_auth")
    public ResponseResult login(@RequestBody LoginDTO loginDTO){

        ApLoginVO apLoginVo = apUserService.login(loginDTO);
        return ResponseResult.okResult(apLoginVo);
    }
}
